
#pragma once

#include "base/core/singleton.h"
#include "Common/TableDefine.h"


class TreasureAwardlibCfg : public ManualSingleton <TreasureAwardlibCfg>
{
	friend ManualSingleton <TreasureAwardlibCfg>;
public:
	TreasureAwardlibCfg();
	~TreasureAwardlibCfg();
	bool Init(const char *szCfgFile, const char *szSplitChar);
	bool UnInit();
	void Clear();
	const TreasureAwardlibCfgInfo *GetTreasureAwardlibCfgInfo(int32_t id);
	const TreasureAwardlibCfgMap *GetTreasureAwardlibCfgMap() { return &m_TreasureAwardlibCfgMap; }
private:
	TreasureAwardlibCfgMap m_TreasureAwardlibCfgMap;
};

#define  g_MakeTreasureAwardlibCfgTable() (TreasureAwardlibCfg::Instance())
#define  g_GetTreasureAwardlibCfgTable() (TreasureAwardlibCfg::GetInstance())
#define  g_DelTreasureAwardlibCfgTable() (TreasureAwardlibCfg::Destroy())